<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<h1>
	<fmt:message key="accounts.search.title" />
</h1>

<c:url value="/accounts" var="accountsUrl"/>
<form:form action="${accountsUrl}" modelAttribute="accountSearchCriteria" method="get" role="form" class="form-horizontal">
	<fieldset>
		<legend>
			<fmt:message key="label.AccountSearchCriteria" />
		</legend>
		<div class="form-group">
			<label class="control-label col-sm-2" for="searchString">
				<fmt:message key="label.AccountSearchCriteria.searchString" />
			</label>
			<div class="col-sm-4"> 
				<form:input path="searchString" class="form-control"/>
			</div>
			<div class="col-sm-6">
				<form:errors cssClass="alert alert-danger" path="searchString" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2" for="maximumResults">
				<fmt:message key="label.AccountSearchCriteria.maximumResults" />
			</label>
			<div class="col-sm-4"> 
			<form:select path="maximumResults" class="form-control">
				<form:option label="5" value="5"/>
				<form:option label="10" value="10"/>
				<form:option label="15" value="15"/>
			</form:select>
			</div>
		</div>
		<div class="form-group"> 
    		<div class="col-sm-offset-2 col-sm-10">
				<button id="searchButton" type="submit" class="btn btn-default">
					<fmt:message key="command.search"/>
				</button>
			</div>
		</div>		
	</fieldset>
</form:form>